Asymmetric tesseral shim coils for magnetic resonance

ABSTRACT

Asymmetric tesseral coils and sets for magnetic resonance applications are provided. Also provided are methods for designing such coils, as well as coils generating arbitrary field profiles. In certain embodiments, the coils are rigorously constrained to have finite dimensions.

1. FIELD OF THE INVENTION

[0001] This invention relates to shim coils. In particular, the invention relates to shim coils suitable for use in magnetic resonance applications that generate tesseral fields located asymmetrically in a finite-length coil. A method for the design of such shim coils of the type useful for Magnetic Resonance applications is described. The method involves a type of target-field approach, but the exact geometry of the shim coils is treated without approximation. In particular, the fact that shim coils are of finite length is catered for. Although illustrated herein in terms of shim coils, the methods of the invention can also be used to design essentially any type of coil which is to be used to produce a desired magnetic field, including, without limitation, gradient coils and H₀-producing coils.

2. BACKGROUND TO THE INVENTION

[0002] In magnetic resonance imaging (MRI) applications, a patient is placed in a strong and homogeneous static magnetic field, causing the otherwise randomly oriented magnetic moments of the protons, in water molecules within the body, to precess around the direction of the applied field. The part of the body in the homogeneous region of the magnet is then irradiated with radio-frequency (RF) energy, causing some of the protons to change their spin orientation. When the RF energy source is removed, the protons in the sample return to their original configuration, inducing a measurable signal in a receiver coil tuned to the frequency of precession. This is the magnetic resonance (MR) signal. Most importantly, the frequency at which protons absorb the RF signal depends on the background magnetic field.

[0003] In practice, the presence of the patient's body perturbs the strong magnetic field slightly, and so shim coils are used to correct the field, to give the best possible final image. The field within a specified target volume (the diameter of the sensitive volume, or DSV) is typically represented in terms of spherical harmonics, and so impurities in the field are analyzed in terms of the coefficients of an expansion in these harmonics. Shim coils are therefore designed to correct a perturbed magnetic field by producing a particular spherical harmonic that can be added to the background magnetic field, so as to cancel the effect of a certain harmonic caused by an impurity. Many of these coils may be present in a particular MRI device, and each may have its own power supply, to produce the required current flow.

[0004] The major task associated with the design of these shim coils is to determine the precise windings on the coil that will produce the desired magnetic field within the coil. One method, due to Turner (1986, A target field approach to optimal coil design, J. Phys. D: Appl. Phys. 19, 147-151), is to specify a desired target field inside the cylinder, at some radius less than the coil radius. Fourier transform methods are then used to find the current density on the surface of the coil, required to give the desired target field. This method has been widely used and is successful in applications, but it is based on the approximation that the coil is, in some sense, infinite in length so that the Fourier transform technique can be applied. Finite-length coils can be simulated in this technique by adding a constraint that the current density must fall to zero outside some finite interval, and this is discussed by Turner in U.S. Pat. No. 5,289,151. Nevertheless, coils of finite length are not natural to this approach, and in some circumstances smoothing functions have to be incorporated in the Fourier transform so as to guarantee its convergence.

[0005] A related method for overcoming the difficulty associated with coils of finite length has been advanced by Forbes, Crozier and Doddrell in Australian Provisional Patent Application PQ9787 (see U.S. Pat. No. 6,377,148 B1) and Forbes and Crozier (2001, Asymmetric zonal shim coils for Magnetic Resonance applications, Med. Phys. 28, 1644-1651). The technique employs a target-field approach and builds in the finite length of the coils by making use of a Fourier series technique. This approach involves approximations, but is capable of designing coils for asymmetrically located fields in a very systematic way.

[0006] An alternative method for the design of coils of finite length is the stochastic optimization approach pioneered by Crozier and Doddrell (1993, Gradient-coil design by simulated annealing, J. Magn. Reson. A 103, 354-357). This approach seeks to produce a desired field in a given volume (the DSV) using optimization methods to adjust the location of certain loops of wire and the current flowing in those loops. The method is very robust, since it uses simulated annealing as its optimization strategy, and it can incorporate other constraints in a straightforward manner by means of a Lagrange-multiplier technique. Coils of genuinely finite length are accounted for without approximation by this technique, and it therefore has distinct advantages over the target field method (and alternative methods based on finite-elements). Since it relies on a stochastic optimization strategy, it can even cope with discontinuous objective functions, and so can accommodate adding or removing loops of wire during the optimization process. The method has the drawback that the stochastic optimization technique can take many iterations to converge, and so can be expensive of computer time. In addition, the technique is undoubtedly more difficult to apply to the design of coils that produce more complicated magnetic fields, such as those involved in higher-order spherical harmonics with tesseral components.

[0007] It is an object of the invention to provide coil structures that generate desired fields internal or external to the coil structure, that may be symmetric or non-symmetric with respect to that structure. For example, in connection with certain preferred embodiments, it is an object of the invention to provide coil structures that generate desired fields within certain specific and asymmetric portions of the coil structure.

[0008] It is a further object of the invention to provide a general systematic method for producing any desired zonal or tesseral or otherwise shaped magnetic field within and/or outside a coil, taking the finite length of the coil into account without approximation.

3. SUMMARY OF THE INVENTION

[0009] In one broad form, the invention provides a method for the design of coils for the production of magnetic fields. For example, such coils can be shim coils of the type suitable for use in Magnetic Resonance applications. The method involves a type of target-field approach, but the exact geometry of the coils is treated without approximation. In particular, the fact that coils are of finite length is catered for.

[0010] Target fields of any desired type may be specified, and may involve zonal and tesseral harmonics or any other specified field shape. The method of this invention can be used to design the coil windings needed to produce the specified target field. In this approach, there is complete freedom in the choice of target field. For example, there is no requirement to restrict the target field to any one spherical harmonic. The method is therefore able to design coils in which the region of interest is located asymmetrically with respect to the coil length. In addition, to improve the accuracy of the fields produced by the coil, the design methodology of this invention can match desired target fields at two or more different target radii, which preferably are co-axial.

[0011] In one embodiment, the invention provides a method for designing a coil, e.g., a tesseral shim coil for a magnetic resonance system, where the coil extends from −L to +L along a longitudinal axis which lies along the z-axis of a three dimensional coordinate system, and the method comprises the steps of:

[0012] (a) selecting a cylindrical surface having a radius r=a for calculating current densities for the coil (the “r=a surface”), the surface surrounding the longitudinal axis and extending from −L to +L;

[0013] (b) selecting a set of desired values for the longitudinal component of the magnetic field B_(z) (or H_(T))to be produced by the coil at locations which are spaced along the longitudinal axis from z=pL to z=qL where −1<p<q<1 (for example, the desired values for the longitudinal component of the magnetic field can be defined by a preselected single tesseral or combinations of tesseral harmonics); and

[0014] (c) determining a current density distribution j(θ,z) for the coil by:

[0015] (1) establishing equations for the relationships between the current density and the target fields (see, for example, equations 4.9-4.12 herein); and

[0016] (2) solving said equations using a matrix regularization method (see, for example, equations 4.13-4.17), wherein the regularized expression to be minimized, in one preferred embodiment, is the curvature of a streamfunction defined by, for example, equations 4.18 and 4.19 set forth below.

[0017] In other embodiments, the quantities for minimization in the regularization procedure can be the power and/or energy contained in the device (see, for example, equation 4.14).

[0018] The procedures outlined in (1) and (2) above can be preferably used for multiple target field regions (see, for example, equations 4.20-4.23)

[0019] The method preferably also includes the additional step of generating discrete current carrying windings for the coil from the current density distribution j(θ,z) by:

[0020] (1) using the current density vector j(θ,z) to create a streamfunction ψ according to, for example, equations 4.16 and 4.17

[0021] (2) selecting a number of current carrying windings N;

[0022] (3) determining a current per winding value I=J/N, where J is the total obtained by integrating the current density vector over the r=a surface (the “total integrated current”);

[0023] (4) contouring the streamfunction ψ and thereby determining a set of j(θ,z) blocks over the r=a surface (i.e., the surface of the current density cylinder) within the longitudinal range from −L to +L such that the integral of j(θ,z) over each block equals I; and

[0024] (5) for all blocks having a net polarity for j(θ,z) over the block, placing a winding at the center of the block, the direction of the current in the winding corresponding to said net polarity.

[0025] The method can be used for symmetrical and asymmetrical cases, i.e., |p|=|q| and |p|≈|q|, respectively.

[0026] In one of its general method aspects, the invention provides a method for designing a coil, where the coil has a longitudinal axis which lies along the z-axis of a three dimensional coordinate system, said method comprising the steps of:

[0027] (a) selecting one or more cylindrical surfaces S₁ (i≧1) for calculating current densities for the coil, each surface (1) having a radius a₁, (2) surrounding the longitudinal axis, and (3) extending from −L₁ to +L₁;

[0028] (b) selecting a set of desired values for the longitudinal component of the magnetic field B_(z) (or H_(T)) to be produced by the coil at target locations on one or more cylindrical surfaces T_(J) (j≧1) which extend along the longitudinal axis from z=p₁ , to z=qL₁ where i=1 and −1<p<q<1; and

[0029] (c) determining current density distributions j_(i)(θ,z) at the S₁ surfaces for the coil by:

[0030] (1) expressing B_(z) (or H_(T)) in terms of j₁(θ,z) (see, for example, equations 4.1 to 4.4 and 4.6);

[0031] (2) expressing the z-component of each of the j₁(θ,z) (j_(z1)(θ,z)) in terms of a basis function expansion and constraining j_(zi)(θ,z) to equal 0 at −L₁ and +L₁, said expansion including a set of coefficients (see, for example, equation 4.7);

[0032] (3) expressing B_(z) (or H_(T)) in terms of said basis function expansions (see, for example, equations 4.5, 4.8, 4.9 and 4.10); and

[0033] (4) for each of j_(z1)(θ,z), determining values for said set of coefficients of said basis function expansion by:

[0034] i. selecting an error function which comprises a measure of the difference between the desired B_(z) (or H_(T)) values at the target locations and the B_(z) (or H_(T)) values calculated at those locations using the basis function expansions of the j_(zi)(θ,z) (see, for example, equations 4.11 and 4.12);

[0035] ii. regularizing said error function (see, for example, equation 4.13); and

[0036] iii. determining values for the sets of coefficients using the regularized error function (see, for example, equation 4.14-4.15); and

[0037] (5) determining the azimuthal-component of j₁(θ,z) (j_(θi)(θ,z)) using the values for the sets of coefficients determined in step (c)(4) and the continuity equation.

[0038] In accordance with another of its general method aspects, the invention provides a method for designing a coil comprising:

[0039] (a) selecting one or more surfaces S_(i) (i≧1) for calculating current densities for the coil;

[0040] (b) selecting a set of desired values for one or more components of the magnetic field B (or H) to be produced by the coil at target locations on one or more surfaces T_(j) (j≧1); and

[0041] (c) determining current density distributions j₁ at the S₁ surfaces for the coil by:

[0042] (1) expressing B (or H) in terms of j_(i);

[0043] (2) expressing each of the j₁ in terms of a basis function expansion having a set of coefficients;

[0044] (3) expressing B (or H) in terms of said basis function expansions; and

[0045] (4) for each j₁ determining values for said set of coefficients of said basis function expansion by:

[0046] i. selecting an error function which comprises a measure of the difference between the desired B (or H) values at the target locations and B (or H) values calculated at those locations using the basis function expansions of the j_(i);

[0047] ii. regularizing said error function using one or more regularization parameters, one parameter for each j_(i), said parameter being the curvature of a streamfunction for j_(i) (see, for example, equations 4.16-4.19); and

[0048] iii. determining values for the sets of coefficients using the regularized error function.

[0049] The various preferred and other embodiments discussed above and below apply to these general forms of the method aspects of the invention.

[0050] In another broad form, the invention provides coils, e.g., shim coils, for the production of tesseral magnetic fields located asymmetrically in a finite-length coil. As is well known in the art, a zonal field has complete azimuthal symmetry, i.e., it is not a function of θ in a conventional cylindrical coordinate system, while a tesseral field does not have complete azimuthal symmetry, i.e., it depends on θ.

[0051] In one embodiment, the invention provides a tesseral coil (e.g., a member of a shim set) having (i) a longitudinal axis (e.g., the z-axis) and a radius r describing a primary cylindrical surface and (ii) a predetermined volume in which at least one predetermined tesseral harmonic is generated (the tesseral harmonic volume; e.g., a shimming volume), and comprising a plurality of current-carrying windings (e.g., interconnected, arc-like, windings) associated with the primary cylindrical surface (e.g., mounted on and/or mounted in and/or mounted to a support member located at the cylindrical surface), the tesseral coil producing a magnetic field, the longitudinal component of which is given by: $\begin{matrix} {{B\left( {r,\theta,\varphi} \right)} = {\sum\limits_{n = 0}^{\infty}\quad {\sum\limits_{m = 0}^{m = n}\quad {{r^{n}\left\lbrack {{A_{n\quad m}{\cos \left( {m\quad \varphi} \right)}} + {B_{n\quad m}{\sin \left( {m\quad \varphi} \right)}}} \right\rbrack}{P_{n\quad m}\left( {\cos \quad \theta} \right)}}}}} & (1) \end{matrix}$

[0052] where

[0053] A_(nm) and B_(nm) are the amplitudes of spherical harmonics, P_(nm)(cos θ) are associated Legendre polynomials, n is the order and m the degree of the polynomial, and r,θ and φ are polar (spherical) co-ordinates;

[0054] and wherein:

[0055] (i) the at least one predetermined tesseral harmonic has a degree m′ and an order n′ which satisfy the relationships:

[0056] m′>0, and

[0057] n′≧2;

[0058] (ii) the primary cylindrical surface has first and second ends which define a length 2L therebetween; and

[0059] (iii) the tesseral harmonic volume extends along the longitudinal axis from z=pL to z=qL, where

[0060] (a) −1<p<q<1;

[0061] (b) |p|≈|q|(i.e., the tesseral harmonic volume is located asymmetrically with respect to the overall geometry of the coil); and

[0062] (c) z=0 is midway between the first and second ends of the primary cylindrical surface.

[0063] In certain embodiments of the invention, the tesseral coil generates at least one additional predetermined tesseral harmonic in the tesseral harmonic volume, said at least one additional harmonic having a degree different from m′ and/or an order different from n′

[0064] Preferably, the tesseral coil is a shim coil and most preferably, the shim coil is a member of a shim set for which all of the tesseral coils in the set are of the above type.

[0065] In the case of tesseral shim coils used for high resolution spectroscopy, i.e., NMR, q−p is preferably greater than or equal to 0.01 and most preferably greater than or equal to 0.05. In the case of tesseral shim coils used for clinical imaging, i.e., MRI, q−p is preferably greater than or equal to 0.05 and most preferably greater than or equal to 0.5.

[0066] In accordance with certain preferred embodiments of the invention, the tesseral coil generates a single predetermined tesseral harmonic, the tesseral harmonic volume defines a midpoint M along the longitudinal axis, the volume has a characteristic radius c given by:

c=(q−p)L/2when q−p<1,   (2)

[0067] and by:

c=(q−p)L/3when q−p≧1,   and (3)

[0068] the tesseral coil has a purity (P′) which is less than or equal to 0.2, where P′ equals the ratio of (1) the sum of the magnitudes of all harmonic coefficients other than the coefficient of the predetermined tesseral harmonic which have a magnitude which is at least 0.001% of the magnitude of the coefficient of the predetermined tesseral harmonic to (2) the magnitude of the coefficient of the predetermined tesseral harmonic..

[0069] Most preferably, P′ is less than or equal to 0.05.

[0070] In certain specific applications of the invention, the tesseral coil has the following characteristics:

[0071] (i) n′=2 or 3;

[0072] (ii) q−p≧0.7;

[0073] (iii) 2L ≦1.4 meters; and

[0074] (iv) P′≧0.1;

[0075] while in other specific applications, it has the following characteristics:

[0076] (i) n′=4, 5, 6, 7,or8;

[0077] (ii) q−p≧0.7;

[0078] (iii) 2L ≧1.4 meters; and

[0079] (iv) P′≦0.2.

[0080] In each case, m′ will typically be less than or equal to n′.

[0081] In other preferred embodiments, the tesseral coil produces a plurality of predetermined tesseral harmonics, the tesseral harmonic volume defines a midpoint M along the longitudinal axis, the tesseral harmonic volume has a characteristic radius c given by:

c=(q−p)L/2 when q−p<1,

[0082] and by:

c=(q−p)L/3 when q−p>1; and

[0083] the tesseral coil has a purity (P′) which is less than or equal to 0.2 (preferably less than or equal to 0.05), where P′ equals the ratio of (1) the sum of the magnitudes of all harmonic coefficients other than the coefficients of the plurality of predetermined tesseral harmonics which have a magnitude which is at least 0.001% of the magnitude of the largest coefficient of the plurality of predetermined tesseral harmonics to (2) the sum of the magnitudes of the coefficients of the plurality of predetermined tesseral harmonics.

[0084] In still further preferred embodiments, the tesseral coil further comprises a shielding cylindrical surface co-axial and external to the primary cylindrical surface, said shielding cylindrical surface having a plurality of current-carrying windings associated therewith, said windings of the primary and shielding cylindrical surfaces causing the magnitude of the magnetic field generated by the tesseral coil to be below a predetermined value (preferably effectively zero) outside of a predetermined surface external to the shielding cylindrical surface. In connection with these embodiments, the shielding cylindrical surface has first and second ends which define a length 2L′ therebetween, where L′=r_(b)L and r_(b) is preferably greater than or equal to 1.0.

[0085] For clinical imaging applications of the invention, either |p| or |q| is preferably greater than or equal to 0.7.

[0086] Asymmetric tesseral shim coils may be used in compact conventional magnet systems such as those of U.S. Pat. No. 5,818,319 or alternately, they may be used in asymmetric magnets, such as the magnets of U.S. Pat. No. 6,140,900.

4. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] The invention will be described by way of examples with reference to the drawings in which:

[0088]FIG. 1 is a diagram illustrating the coil of radius a and length 2L, with a single internal target region of radius c located asymmetrically along the coil's length. The coordinate system is indicated, in which the z-axis lies along the centre of the coil.

[0089]FIG. 2 shows a winding pattern for a T₁₁ shim coil, obtained by taking contours of the calculated streamfunction. The parameters used in this calculation are L=0.5 metre, a=0.2 metre, p=−0.7, q=0.1, c₁=0.15 metre, c₂=0.075 metre and H_(max)=1 Amp/metre.

[0090]FIG. 3(a) shows contours and FIG. 3(b) shows a stack plot, for the H_(z) component of the magnetic field produced by the T₁₁ shim coil of FIG. 2. The dashed lines in FIG. 3(a) represent the target region.

[0091]FIG. 4 shows winding patterns for a T₂₁ shim coil, obtained for (a) in FIG. 4a, a single target field imposed at c=0.15 metre, and (b) in FIG. 4b, two target fields imposed at radii c₁=0.15 metre, c₂=0.075 metre. The parameters used in this calculation are L=0.5 metre, a=0.2 metre, p=−0.7, q=0.1, and H_(max)=1 Amp/metre.

[0092]FIG. 5 shows the H_(z) field as a function of position z along the coil, for θ=π, evaluated at the target radii r=c₁ and r=c₂. The coil geometry is the same as for FIG. 4. The curves drawn with solid lines are the field components obtained when two target radii are used, and the curves drawn with dashed lines represent the situation in which the field is imposed at only a single target radius.

[0093]FIG. 6 shows a winding pattern for a T₃₁ shim coil. The parameters used in this calculation are L=0.5 metre, a=0.2 metre, p=−0.7, q=0.1 c₁=0.15 metre, c₂=0.075 metre and H_(max)=1 Amp/metre.

[0094]FIG. 7 shows a winding pattern for a T₄₂ shim coil. The parameters used in this calculation are L=0.5 metre, a=0.2 metre, p=−0.7, q=0.1 c₁=0.15 metre, c₂=0.075 metre and H_(max)=1 Amp/metre.

[0095]FIG. 8 shows a winding pattern for a shielded T₃₁ shim coil. FIG. 8(a) shows the winding pattern for the shim coil and FIG. 8(b) shows the winding pattern for the shield coil. The parameters used in this calculation are L=0.5 metre, a=0.2 metre, p=−0.7, q=0.1, c₁=0.15 metre, c₂=0.075 metre and H_(max)=1 Amp/metre. The shield length was 1.2 times the shim coil length and the shield radius was 0.25 metre.

[0096]FIG. 9 shows contours for the H_(z) component of the magnetic field produced by the shielded T₃₁ shim coil of FIG. 8.

[0097]FIG. 10 is a flow chart useful in describing and understanding certain of the method aspects of the invention.

[0098] The foregoing drawings, which are incorporated in and constitute part of the specification, illustrate the preferred embodiments of the invention, and together with he description, serve to explain the principles of the invention. It is to be understood, of course, that both the drawings and the description are explanatory only and are not restrictive of the invention.

5. DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

[0099] As discussed above, the present invention relates to tesseral coils having prescribed properties and to methods for designing these and other types of coils. FIG. 10 illustrates the overall numerical procedure of the invention with reference to the various equations presented below.

[0100] The method of the invention as described below is preferably practiced on a digital computer system configured by suitable programming to perform the various computational steps. The programming can be done in various programming languages known in the art. A preferred programming language is the C language which is particularly well-suited to performing scientific calculations. Other languages which can be used include FORTRAN, BASIC, PASCAL, C⁺⁺, and the like. The program can be embodied as an article of manufacture comprising a computer usable medium, such as a magnetic disc, an optical disc, or the like, upon which the program is encoded.

[0101] The computer system can comprise a general purpose scientific computer and its associated peripherals, such as the computers and peripherals currently being manufactured by DIGITAL EQUIPMENT CORPORATION, IBM, HEWLETT-PACKARD, SUN MICROSYSTEMS, SGI or the like. For example, the numerical procedures of the invention can be implemented in C-code and performed on a personal computer. The system should include means for inputting data and means for outputting the results of the coil design both in electronic and visual form. The output can also be stored on a disk drive, tape drive, or the like for further analysis and/or subsequent display.

[0102] 5.1 The Basic Design Approach

[0103] The design of a cylindrical coil of length 2L and radius a, that gives a desired magnetic field at some target radius c within the coil, involves the solution of a well-known mathematical set of equations and boundary conditions. Here, the location of a point within the coil will be given in cylindrical polar coordinates (r,θ,z). The z-axis points along the centre of the coil, which is located over the interval −L<z<L. The target field is located in the interval pL<z<qL, where the numbers p and q are required to satisfy the constraints −1<p<q<1. A sketch of the geometry for this coil and the location of its target field is given in FIG. 1.

[0104] The symbol H(r,θ,z) (Amps/metre) will be used to denote the magnetic field vector at such a point, and it is related to the magnetic induction vector B(r,θ,z) (Webers/square metre) by the constitutive relation B=μ₀H, in which the constant μ₀ represents the magnetic permeability of free space. The shim coil may be idealized to be a cylindrical surface on which a current density vector j(θ,z) (Amps/metre) is flowing.

[0105] The relationship between the magnetic induction vector B at a field point (r,θ,z) within the coil and the current density vector j on the coil is given by the generalized Biot-Savart law $\begin{matrix} {{B(r)} = {{- \frac{\mu_{0}}{2\pi}}\underset{s}{\int\int}\frac{\left( {r - r^{\prime}} \right) \times {j\left( r^{\prime} \right)}}{{{r - r^{\prime}}}^{3}}{\quad A^{\prime}}}} & \text{(4.1)} \end{matrix}$

[0106] in which r denotes the field point (r,θ,z) within the coil and r′ represents a source point (a,θ,z′) on the coil. The surface S is the coil r=a itself. It is convenient to represent the current density vector on the coil in polar coordinates $\begin{matrix} {\quad \begin{matrix} {{j\left( r^{\prime} \right)} = {{{j_{\theta}\left( {\theta^{\quad \prime^{\quad}},z^{\prime}} \right)}e_{\theta^{\prime}}} + {{j_{z}\left( {\theta^{\prime},z^{\prime}} \right)}e_{z^{\prime}}}}} \\ {= {{{- {sin\theta}^{\prime}}{j_{\theta}\left( {\theta^{\prime},z^{\prime}} \right)}e_{x}} + {{cos\theta}^{\prime}{j_{\theta}\left( {\theta^{\quad \prime},z^{\prime}} \right)}e_{y}} + {{j_{z}\left( {\theta^{\prime},z^{\prime}} \right)}e_{z}}}} \end{matrix}} & \text{(4.2)} \end{matrix}$

[0107] but to express the magnetic induction field in Cartesian coordinates in the form

B(r,θ,z)=B _(x)(r,θ,z)e _(x) +B _(Y)(r,θ,z)e _(y) +B _(z)(r,θ,z)e _(z)   (4.3)

[0108] In these equations, the vector e_(x) denotes the unit vector in the x-direction, with a similar notation applying for the other unit basis vectors.

[0109] Equations (4.2) and (4.3) may be substituted into the Biot-Savart law (4.1) to yield expressions for the three components B_(X), B_(Y) and B_(Z) of the induction field. The calculation is straightforward, but the final equations are lengthy and so will not be given in full. It is sufficient here only to give the expression for the component of the magnetic induction field B_(Z) that points along the centre of the coil (i.e., along the z-axis). The result is $\begin{matrix} {{{B_{z}\left( {r,\theta,z} \right)} = {{- \frac{\mu_{0}a}{2\pi}}{\int_{0}^{2\pi}{\int_{- L}^{L}\quad {\frac{\left\lbrack {{r\quad {\cos \left( {\theta - \theta^{\prime}} \right)}} - a} \right\rbrack {j_{\theta}\left( {\theta^{\prime},z^{\prime}} \right)}}{\left\lbrack {r^{2} + a^{2} - {2{ar}\quad {\cos \left( {\theta - \theta^{\prime}} \right)}} + \left( {z + z^{\prime}} \right)^{2}} \right\rbrack^{3/2}}\quad {z^{\prime}}{{{\theta^{\prime}}^{\quad}}.}}}}}}\quad} & \text{(4.4)} \end{matrix}$

[0110] It follows from this equation that the z-component of the induction field only involves the azimuthal component j_(θ) of the current density vector. However, this is related to the axial component j_(z) through the equation of continuity $\begin{matrix} {{{\frac{1}{a}\frac{\partial{j_{\theta}\left( {\theta,z} \right)}}{\partial\theta}} + \frac{\partial{j_{z}\left( {\theta,z} \right)}}{\partial z}} = 0} & \text{(4.5)} \end{matrix}$

[0111] for the current density on the coil.

[0112] The aim is to find an azimuthal current density component j_(θ)(θ,z) on the surface of the coil r=a, over the entire coil length −L<z<L, so as to produce a desired magnetic induction field

B _(z)(c,θ,z)=μ₀ H _(T)(c;θ,z)

[0113] at some target radius c<a within the coil, and over some restricted interval pL<z<qL. The numbers p and q are arbitrary and satisfy the condition −1<p<q<1. Since these numbers may be chosen freely by the designer, the region of interest within the coil may therefore be located asymmetrically with respect to the coil's length. In the following, the axial magnetic field component H_(T) (c;θ,z) (Amps/metre) will be referred to as the target field.

[0114] It follows from equation (4.4) that the current density component j_(θ)(θ,z) must satisfy the integral equation $\begin{matrix} {{{H_{T}\left( {{c;\theta},z} \right)} = {{- \frac{a}{2\pi}}{\int_{0}^{2\pi}{\int_{- L}^{L}{\frac{\left\lbrack {{c\quad {\cos \left( {\theta - \theta^{\prime}} \right)}} - a} \right\rbrack {j_{\theta}\left( {\theta^{\prime},z^{\prime}} \right)}}{\left( \left\lbrack c^{2} + a^{2} - {2a\quad c\quad {\cos \left( {\theta - \theta^{\prime}} \right)}} + \left. \left( {z - z^{\prime}} \right)^{2} \right\rbrack \right. \right)^{3/2}}{z^{\prime}}{\theta^{\prime}}}}}}},{{pL} < z < {{qL}.}}} & \text{(4.6)} \end{matrix}$

[0115] Equations of this type are well known in the scientific literature (see L. M. Delves and J. L. Mohamed, Computational Methods for Integral Equations, Cambridge University Press, Cambridge, 1985). They are known as Fredholm integral equations of the first kind, and the solution of such equations can lead to famously ill-conditioned problems. In the present situation, the equation (4.6) is likely to be so ill-conditioned that, for a given target field H_(T) (c;θ,z), there will not be a unique current density function j_(θ)(θ,z) that satisfies the equation. Consequently, some additional constraint must be placed upon the current density j_(θ), and this is known as a regularizing condition (see U.S. Pat. No. 6,377,148 B1; L. K. Forbes and S. Crozier, 2001, A novel target-field method for finite-length Magnetic Resonance shim coils: Part 1: Zonal shims, J. Phys. D: Appl. Phys., vol. 34, 3447-3455, (2001).).

[0116] The axial component j_(z) of the current density must vanish at the ends z=±L and so we have chosen to represent it in the form $\begin{matrix} {{j_{z}\left( {\theta,z} \right)} = {\sum\limits_{n = 1}^{N}\quad {\sum\limits_{m = 1}^{M}\quad {\frac{2{mL}}{n\quad \pi \quad a}\left( {{P_{nm}{\sin \left( {m\quad \theta} \right)}} - {Q_{nm}{\cos \left( {m\quad \theta} \right)}}} \right){{\sin \left( \frac{n\quad {\pi \left( {z + L} \right)}}{2L} \right)}.}}}}} & \text{(4.7)} \end{matrix}$

[0117] Here, the coefficients P_(nm) and Q_(nm) are to be found, and the numbers N and M of coefficients may be chosen by the designer, based on the accuracy desired and the availability of computer resources.

[0118] The azimuthal component j_(θ) of the current density is now obtained from the form (4.7), using the continuity equation (4.5). After some calculation, it is found that the appropriate form for this component is given by the equation $\begin{matrix} {\quad \begin{matrix} {{j_{\theta}\left( {\theta,z} \right)} = \quad {{\sum\limits_{n = 1}^{N}\quad {P_{n0}{\sin \left( \frac{n\quad {\pi \left( {z + L} \right)}}{2L} \right)}}} +}} \\ {\quad {\sum\limits_{n = 1}^{N}\quad {\sum\limits_{m = 1}^{M}\quad {\left( {{P_{nm}{\cos \left( {m\quad \theta} \right)}} + {Q_{nm}{\sin \left( {m\quad \theta} \right)}}} \right){\cos \left( \frac{n\quad {\pi \left( {z + L} \right)}}{2L} \right)}}}}} \end{matrix}} & \text{(4.8)} \end{matrix}$

[0119] If this form were to be substituted directly into the governing integral equation (4.6) there would result, after some algebra, a formal expression for the target field in the form $\begin{matrix} {{{H_{T}\left( {{c;\theta},z} \right)} = {{- {\sum\limits_{n = 1}^{N}\quad {P_{n0}{U_{n0}\left( {c;z} \right)}}}} - {\sum\limits_{m = 1}^{M}\quad {\sum\limits_{n = 1}^{N}\quad {{U_{nm}\left( {c;z} \right)}\left\lbrack {{P_{nm}{\cos \left( {m\quad \theta} \right)}} + {Q_{nm}{\sin \left( {m\quad \theta} \right)}}} \right\rbrack}}}}},} & \text{(4.9)} \end{matrix}$

[0120] in which the intermediate functions U_(n0)(z) and U_(nm)(z) are defined by the expressions $\begin{matrix} {\begin{matrix} \begin{matrix} {{U_{n0}\left( {c;z} \right)} = {\frac{a}{\pi}{\int_{- L}^{L}{\int_{0}^{\pi}\frac{\left\lbrack {{c\quad \cos \quad \beta} - a} \right\rbrack {\sin \left( \frac{n\quad {\pi \left( {z^{\prime} + L} \right)}}{2L} \right)}{\beta}{z^{\prime}}}{\left\lbrack {c^{2} + a^{2} - {2{ac}\quad \cos \quad \beta} + \left( {z - z^{\prime}} \right)^{2}} \right\rbrack^{3/2}}}}}} \\ {{{U_{nm}\left( {c;z} \right)} = {\frac{a}{\pi}{\int_{- L}^{L}{\int_{0}^{\pi}\frac{\left\lbrack {{c\quad \cos \quad \beta} - a} \right\rbrack {\cos \left( {m\quad \beta} \right)}{\cos \left( \frac{n\quad {\pi \left( {z^{\prime} + L} \right)}}{2L} \right)}{\beta}{z^{\prime}}}{\left\lbrack {c^{2} + a^{2} - {2{ac}\quad \cos \quad \beta} + \left( {z - z^{\prime}} \right)^{2}} \right\rbrack^{3/2}}}}}},{m \geq 1.}} \end{matrix} & \quad \end{matrix}\quad} & \text{(4.10)} \end{matrix}$

[0121] It is possible to derive a formal system of equations for the unknown coefficients P_(nm) and Q_(nm) from this relation (4.9) using the standard theory of Fourier series, but as has already been discussed, the system that results is so ill-conditioned that it cannot sensibly be solved, and an alternative procedure is needed.

[0122] For arbitrarily large N and M, it can be shown (see L. K. Forbes and S.Crozier, A novel target-field method for finite-length magnetic resonance shim coils: Part 2. Tesseral shims,” J.Phys.D.:Appl.Phys. 35 (2002) 839-849) that an appropriate measure of how well equation (4.9) is satisfied is given by the expression $\begin{matrix} \begin{matrix} {{E\left( {P_{n0},P_{nm},{Q_{nm};c}} \right)} = \quad {{\int_{pL}^{qL}{{{{M_{0}\left( {c;z} \right)} + {2\pi {\overset{N}{\sum\limits_{n = 1}}{P_{n0}{U_{n0}\left( {c;z} \right)}}}}}}^{2}{z}}} +}} \\ {\quad {\sum\limits_{m = 1}^{M}{\int_{pL}^{qL}{{{M_{m}\left( {c;z} \right)} + {\pi {\sum\limits_{n = 1}^{N}{P_{nm}{U_{n\quad m}\left( {c;z} \right)}}}}}}^{2}}}} \\ {\quad {{z} + {\sum\limits_{m = 1}^{M}{\int_{pL}^{qL}{{{N_{m}\left( {c;z} \right)} + {\pi {\sum\limits_{n = 1}^{N}{Q_{n\quad m}U_{n\quad m}}}}}}}}}} \\ {{{\quad {\left( {c;z} \right)}}^{2}{z}},} \end{matrix} & (4.11) \end{matrix}$

[0123] in which it has been convenient to define the functions $\begin{matrix} {{M_{0}\left( {c;z} \right)} = \quad {\int_{- \pi}^{\pi}{{H_{T}\left( {{c;\beta},z} \right)}{\beta}}}} \\ {{M_{m}\left( {c;z} \right)} = \quad {\int_{- \pi}^{\pi}{{H_{T}\left( {{c;\beta},z} \right)}{\cos \left( {m\quad \beta} \right)}{\beta}}}} \\ {{{N_{m}\left( {c;z} \right)} = \quad {\int_{- \pi}^{\pi}{{H_{T}\left( {{c;\beta},z} \right)}\sin \quad \left( {m\quad \beta} \right){\beta}}}},\quad {m \geq 1}} \end{matrix}$

[0124] The error term E in equation (4.1 1) is actually the square of a norm, in the formal meaning of that term implied by classical mathematical analysis (see see L. K. Forbes and S.Crozier, A novel target-field method for finite-length magnetic resonance shim coils: Part 2. Tesseral shims,” J.Phys.D.:Appl.Phys. 35 (2002) 839-849). It is possible to develop a formal algorithm for determining the coefficients P_(nm) and Q_(nm) by least-squares minimization of the error E in equation (4.11), but this again turns out to be so ill-conditioned as to be of little practical value.

[0125] The coefficients are instead determined by minimizing a regularized expression of the type

G(P _(n0) ,P _(nm) ,Q _(nm) ;c)=E(P _(n0) ,P _(nm) ,Q _(nm) ;c)+λF(P _(n0) ,P _(nm) ,Q _(nm))   (4.13)

[0126] In this equation, the parameter λ is a regularizing constant, and plays a role similar to that of a Lagrange multiplier (see, for example, J. Stewart, Calculus, 4^(th) edition, Brooks-Cole, California, 1999, pages 985-990.). Here, however, its value is determined by numerical experimentation.

[0127] The penalty function F in equation (4.13) may be chosen to be any quantity of practical interest to the designer, and a number of such functions has been tried in the development of the present invention. For example, it is possible to minimize the power in the coil, along with the error term (4.11), by choosing the penalty function to be $\begin{matrix} {F = {{\underset{S}{\int\int}{j}^{2}{A}} = {a{\int_{- L}^{L}{\int_{- \pi}^{\pi}{\left\lbrack {{j_{\theta}^{2}\left( {\theta,z} \right)} + {j_{z}^{2}\left( {\theta,z} \right)}} \right\rbrack {\theta}{{z}.}}}}}}} & (4.14) \end{matrix}$

[0128] The expressions (4.7) and (4.8) for the components j_(θ) and j_(z) of the current density vector on the coil are then substituted directly into the equation (4.14), and after some calculation using routine algebra, an expression for F directly in terms of the unknown coefficients P_(nm) and Q_(nm) is obtained (see, for example, equation 4.19 below).

[0129] The positive-definite function G in equation (4.13) is now minimized, by requiring that $\begin{matrix} {{{\frac{\partial G}{\partial P_{i0}} = 0};{\frac{\partial G}{\partial P_{ij}} = 0};{\frac{\partial G}{\partial Q_{ij}} = 0}},\quad i,{j \geq 1.}} & (4.15) \end{matrix}$

[0130] This approach leads to a system of linear matrix equations for the coefficients P_(n0), P_(nm) and Q_(nm) which may be solved using standard software. In fact, the system de-couples, so that the coefficients P_(nj) and Q_(nj), n=1,2, . . . , N, can be obtained separately, for each value of the index j. This design approach is therefore extremely efficient in its use of computer resources.

[0131] Coil designs have been developed using this approach, for which the coil power in equation (4.14) has been minimized, as described. In using this design approach, there is a trade-off between having a well-conditioned system of equations to solve (which can be achieved with a sufficient large value of the parameter λ) , and satisfying the governing integral equation (4.6) to a high degree of accuracy (which requires that λ in equation (4.13) be small). It is found here that the best results are obtained with λ≈10⁻¹², since this value gives a problem that is sufficiently well conditioned as to be able to be solved, but still retains a high degree of accuracy in reproducing the target field H_(T) (c;θ,z). Nevertheless, it has been found that the most accurate fields and the best coil designs are obtained by minimizing a somewhat more abstract penalty function than the power in equation (4.14); this new penalty function is related to the curvature of a streamfunction, and this is now described.

[0132] 5.2 The Streamfunction, And Optimizing Coil Winding Patterns

[0133] In accordance with the invention, the equation of continuity (4.5) for the current density on the surface of the coil at r=a is used to introduce the concept of a streamfunction ψ on the coil. It follows that equation (4.5) is satisfied identically by any function ψ(θ,z) for which $\begin{matrix} {j_{\theta} = {{\frac{\partial\psi}{\partial z}\quad {and}\quad j_{z}} = {{- \frac{1}{a}}\frac{\partial\psi}{\partial\theta}}}} & (4.16) \end{matrix}$

[0134] It can be proved that the current density vector j is parallel to curves ψ=constant (i.e., streamlines), and that level curves (contours) of the streamfunction ψ give the shape of the winding pattern required to produce the field. A tutorial review of this material is given by Brideson, Forbes and Crozier (2002, Determining complicated winding patterns for shim coils using stream functions and the Target-Field method, Concepts in Magnetic Resonance, vol. 14, 9-19 (2002).).

[0135] The streamfunction required in this situation can be obtained from the definition of the total differential in polar coordinates, equations (4.16), and the forms (expansions) given in equations (4.7) and (4.8). After integrating and some algebra, the result is found to be $\begin{matrix} {{\psi \left( {\theta,z} \right)} = {{- {\sum\limits_{n = 1}^{N}{\frac{2L}{n\quad \pi}P_{n0}\cos \quad \left( \frac{n\quad {\pi \left( {z + L} \right)}}{2L} \right)}}} + {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{\frac{2L}{n\quad \pi}\left( {{P_{n\quad m}\cos \quad \left( {m\quad \theta} \right)} + {Q_{n\quad m}\sin \quad \left( {m\quad \theta} \right)}} \right)\quad {{\sin \left( \frac{n\quad {\pi \left( {z + L} \right)}}{2L} \right)}.}}}}}} & (4.17) \end{matrix}$

[0136] Winding patterns, for the coils designed using the methods of this invention, are obtained simply using a contouring routine for the streamfunction in equation (4.17).

[0137] By minimizing the curvature of the streamfunction in equation (4.17), very smooth winding patterns are produced, and these should be capable of straightforward manufacture. Therefore, the penalty function F in equation (4.13) is chosen to be $\begin{matrix} {F = {{\underset{S}{\int\int}{{\nabla^{2}\psi}}^{2}{A}} = {\int_{- L}^{L}{\int_{- \pi}^{\pi}{\left( {{\frac{1}{a^{2}}\frac{\partial^{2}\psi}{\partial\theta^{2}}} + \frac{\partial^{2}\psi}{\partial z^{2}}} \right)^{2}a{\theta}{{z}.}}}}}} & (4.18) \end{matrix}$

[0138] The form of the streamfunction in equation (4.17) is used directly in the penalty function (4.18), and significant but straightforward calculations yields the result $\begin{matrix} {{F\left( {P_{n0},P_{n\quad m},Q_{n\quad m}} \right)} = {\pi \quad {aL}{\left\{ {{2{\sum\limits_{n = 1}^{N}{\left( \frac{n\quad \pi}{2L} \right)^{2}P_{n0}^{2}}}} + {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{\left( {\frac{2{Lm}^{2}}{n\quad \pi \quad a^{2}} + \frac{n\quad \pi}{2L}} \right)^{2}\left( {P_{n\quad m}^{2} + Q_{n\quad m}^{2}} \right)}}}} \right\}.}}} & (4.19) \end{matrix}$

[0139] The total error function G in equation (4.13) is combined with the expressions (4.11) and (4.19), and its minimum is sought using differentiation, as in equation (4.15). Once again, a de-coupled system of linear equations is obtained for the coefficients P_(n0) P_(nm) and Q_(nm), and these may be solved extremely efficiently with the aid of a standard matrix solution routine.

[0140] 5.3 Matching The Target Field At Two Different Radii

[0141] In numerical simulations, it is found that the scheme described in section 5.1 is capable of matching the target field H_(T) (c;θ,z) to a very high degree of accuracy, and the particular penalty function in section 5.2 produces winding pattern designs that are optimized for smoothness and ease of construction. Tests also suggest, however, that while the magnetic field corresponds closely to the target field at the target radius r=c, it can wander significantly from the desired field at other radii within the coil. A method is therefore desired by which the design techniques of sections 5.1 and 5.2 can be modified to match the target field over a volume, rather than just at a particular radius. This is provided by matching the target field at two different target radii r=c₁ and r=c₂, and the results give excellent coil designs, as will be discussed in section 5.4

[0142] The current density components j_(θ) and j_(z) and the streamfunction ψ are the same as in sections 5.1 and 5.2, and are given in equations (4.7), (4.8) and (4.17). Now, however, the coefficients in these expressions will be altered, so as to match the two target fields H_(T)(c₁;θ,z) and H_(T)(c₂;θ,z) at the two radii c₁ and c₂ respectively. Essentially the aim is now to find a current density j_(θ) that solves the integral equation (4.6) at the two different radii c₁ and c₂ simultaneously. In addition to being ill-conditioned, as before, such a problem would now also be over-determined, and it would not normally be expected to have a unique solution for j_(θ). However, very good results can nevertheless be obtained using least-squares minimization with regularization, as before. This means that the total error function in equation (4.13) is now replaced with the new expression

G(P _(n0) ,P _(nm) ,Q _(nm) ;c ₁ c ₂)=E(P _(n0) ,P _(nm) ,Q _(nm) ;c ₁)+E(P _(n0) ,P _(nm) ,Q _(nm) c ₂)+λF(P _(n0) ,P _(nm) ,Q _(nm))   (4.20)

[0143] in which the error term E is exactly as defined earlier, in equation (4.11), but now appears twice, at the two different radii c₁ and c₂ respectively. The penalty function F is again free to be chosen by the designer, but in this embodiment the particular choice given in equations (4.18) and (4.19) will be illustrated.

[0144] Once again, the total error function G in equation (4.20) is minimized, using the approach described in equation (4.15). This leads to a de-coupled system of linear matrix equations to be solved for the coefficients P_(n0), P_(nm) and Q_(nm). This system may be written $\begin{matrix} {{{{\sum\limits_{n = 1}^{N}{C_{i,j,n}P_{nj}}} = R_{i,j}^{(1)}},\quad {i = 1},\ldots \quad,N,\quad {j = 0},1,\ldots \quad,M}{{{\sum\limits_{n = 1}^{N}{C_{i,j,n}Q_{nj}}} = R_{i,j}^{(2)}},\quad {i = 1},\ldots \quad,N,\quad {j = 1},\ldots \quad,M}} & (4.21) \end{matrix}$

[0145] in which the matrix coefficients are defined to be $\begin{matrix} {C_{i,j,n} = {{2\left( {1 + \delta_{0,j}} \right)\pi^{2}{\int_{pL}^{qL}{\left\lbrack {{{U_{ij}\left( {c_{1};z} \right)}{U_{nj}\left( {c_{1};z} \right)}} + {{U_{ij}\left( {c_{2};z} \right)}{U_{nj}\left( {c_{2};z} \right)}}} \right\rbrack {z}}}} + {\lambda \quad {\delta_{i,n}\left( \frac{i^{2}\pi^{3}a}{2L} \right)}\left( {1 + \frac{4L^{2}j^{2}}{i^{2}\pi^{2}a^{2}}} \right)^{2}}}} & (4.22) \end{matrix}$

[0146] and the right-hand side quantities are $\begin{matrix} \begin{matrix} {R_{i,j}^{(1)} = {{- 2}\quad \pi \quad {\int_{pL}^{qL}{\left\lbrack {{{M_{j}\left( {c_{1};z} \right)}{U_{ij}\left( {c_{1};z} \right)}} + {{M_{j}\left( {c_{2};z} \right)}{U_{ij}\left( {c_{2};z} \right)}}} \right\rbrack {z}}}}} \\ {R_{i,j}^{(2)} = {{- 2}\quad \pi \quad {\int_{pL}^{qL}{\left\lbrack {{{N_{j}\left( {c_{1};z} \right)}{U_{ij}\left( {c_{1};z} \right)}} + {{N_{j}\left( {c_{2};z} \right)}{U_{ij}\left( {c_{2};z} \right)}}} \right\rbrack {{z}.}}}}} \end{matrix} & (4.23) \end{matrix}$

[0147] The symbol δ_(1,m) in equation (4.22) is the Kronecker delta symbol, and takes the value 1 if its indices are equal, and 0 otherwise. The functions U_(1j) are as defined in equations (4.10), and the quantities M_(j) and N_(j) are given in equation (4.12).

[0148] The procedure represented by equations (4.21)-(4.23) for designing tesseral shim coils is therefore extremely efficient, because of its de-coupled structure for obtaining the coefficients.

[0149] In order to use this design procedure, it is necessary to evaluate a number of functions, defined as integrals. The first group of such functions are those represented by the terms U_(n0) and U_(nm) in equations (4.10). These are evaluated numerically by means of the trapezoidal rule, using, for example, 201 integration points over the interval −L<z′<L and 51 points for the domain 0<β<π. It is also necessary to evaluate the expressions (4.12) for the sets of functions M_(m) and N_(m), and this is also accomplished using the trapezoidal rule to approximate the integrals, using, for example, 51 grid points. For integrals involving periodic integrands, such as those in equations (4.12), the trapezoidal rule is optimal, since it is known to have extremely high accuracy (see M. Abramowitz and I. A. Stegun, 1972, Handbook of Mathematical Functions, 8^(th) edition, Dover, New York, page 885).

[0150] 5.4. Results And Example Designs—Unshielded Shims

[0151] The preceding section described how this invention can be used to design coils that can generate any desired tesseral field within a cylindrical coil. To illustrate this approach, we present results in this section for four different coil types, that produce T₁₁, T₂₁, T₃₁ and T₄₂ tesseral magnetic fields located asymmetrically within coils of genuinely finite length. It will be understood by practitioners skilled in the art that the method presented in this invention may be used to design shim coils that produce other field types of interest. These techniques have been used to design both zonal and tesseral shim coil winding patterns, and for fields that involve complicated combinations of pure spherical harmonics.

[0152] In each of the four illustrative designs presented here, the target field will be located in the asymmetrically located interval pL<z<qL, with −1<p<q<1, for a coil in the region −L<z<L. For this purpose, it is convenient to define the non-dimensional variable $\begin{matrix} {Z_{2} = {\frac{z}{L} - \frac{p + q}{2}}} & (5.1) \end{matrix}$

[0153] which is used in U.S. Pat. No. 6,377,148 B1; Australian Provisional Patent Application PQ9787; and by Forbes and Crozier (2001, Asymmetric zonal shim coils for Magnetic Resonance applications, Med. Phys. 28, 1644-1651). This new coordinate Z₂ is centred with respect to the asymmetrically located target field, and it allows the usual formulae for spherical harmonics to be used naturally, for the target region. It will also be useful in the following to define constants $\begin{matrix} {{\beta_{T} = \frac{q - p}{2}};{\gamma_{1} = {{\frac{c_{1}}{L}\quad {and}\quad \gamma_{2}} = {\frac{c_{2}}{L}.}}}} & (5.2) \end{matrix}$

[0154] The standard zonal and tesseral spherical harmonics may be found in the paper by Roméo and Hoult (1984, Magnetic Field Profiling: Analysis and Correcting Coil Design, Magn. Reson. Med. 1 44-65), for example.

EXAMPLE 1

[0155] The T₁₁ Shim Coil

[0156] When the T₁₁ spherical harmonic is evaluated at the two target radii r=c₁ and c₂, it gives the two target fields

H _(T)(c ₁ ;θ,z)=H _(max) cos θ

[0157] $\begin{matrix} {{H_{T}\left( {{c_{2};\theta},z} \right)} = {H_{\max}\frac{\gamma_{2}}{\gamma_{1}}\cos \quad {\theta.}}} & (5.3) \end{matrix}$

[0158] Here, the constant H_(max) is a reference field strength, and it is taken here to have the value 1 Amp/metre for illustrative purposes.

[0159] Once the coefficients P_(n0), P_(nm) and Q_(nm) have been determined, the streamfunction ψ(θ,z) may be evaluated using equation (4.17). The appropriate winding patterns to create the desired coil are then obtained immediately, simply by drawing contours of ψ using standard software. FIG. 2 shows the winding pattern obtained in this way. In this example, the coil length was taken to be 2L=1 metre and its radius was a=0.2 metre. The target field is located in the region defined by parameters p=−0.7 and q=0.1, and so is located very asymmetrically within the coil. The two target radii were taken to be c₁=0.15 metre and c₂=0.075 metre.

[0160] The winding pattern shown in FIG. 2 is essentially of the saddle-coil type, and consists of two sets of windings on opposite sides of the coil. (The pattern shown in FIG. 2 is wrapped around the surface of the cylinder of radius a, since the horizontal axis in this diagram is actually the angle around the cylinder). The set of windings labelled “plus” carry positive current, and the other set, labelled “minus”, are a reverse-winding set carrying negative current. The two vertical contours in the picture are labelled with the number 0, since they carry no current, by symmetry.

[0161] A cross-section of the axial component H_(z) of the magnetic field is shown in FIGS. 3. Contours for the field are presented in FIG. 3(a), in the Cartesian x-z plane for y=0. In this figure, the dashed lines indicate the target region within the coil, and in this region, the field is required to vary uniformly and linearly with x, but to be independent of the axial coordinate z, consistent with equations (5.3). This is evidently the case from FIG. 3(a). The field component H_(z) is negative on the left interior portion of the coil, and positive on the right, and the vertical contour down the middle of the diagram corresponds to the line H_(z)=0, as is required by symmetry.

[0162] A stack plot of the field on the plane y=0 is given in FIG. 3(b). This shows the anti-symmetric nature of the field about the plane x=0. The linear (gradient) portion of the field in the target region is also clearly evident from this picture.

EXAMPLE 2

[0163] The T₂₁ Shim Coil

[0164] To generate a T₂₁ spherical harmonic in the asymmetrically located region pL<z<qL, the appropriate target fields at the two radii c₁ and c₂ are $\begin{matrix} \begin{matrix} {{H_{T}\left( {{c_{1};\theta},z} \right)} = {H_{\max}\frac{Z_{2}}{\beta_{T}}\cos \quad \theta}} \\ {{H_{T}\left( {{c_{2};\theta},z} \right)} = {H_{\max}\frac{\gamma_{2}}{\gamma_{1}}\frac{Z_{2}}{\beta_{T}}\cos \quad {\theta.}}} \end{matrix} & (5.4) \end{matrix}$

[0165] The function Z₂ and the various constants in these expressions (5.4) are given in equations (5.1) and (5.2).

[0166]FIG. 4(a) shows the contours of the streamfunction ψ that give the winding pattern for the T₂₁ coil, in the case in which only a single target field at radius r=c is specified, as in section 5.2. Here, the coil half-length is taken to be L=0.5 metre, and its radius is a=0.2 metre, as before. The single target radius is c=0.15 metre, and the asymmetry parameters are p=−0.7 and q=0.1. This diagram may be contrasted with FIG. 4(b), which shows the winding pattern for the identical coil, but for the case when two target fields at radii c₁=0.15 metre and C₂=0.075 metre are used, as in equation (5.4).

[0167] In both FIGS. 4(a) and 4(b) the pattern of windings alternates, in the sense that the sign of the current changes for each set of windings. The forward windings are labelled “plus” on FIG. 4(b), and the reverse windings, with negative current, are labelled “minus”. The straight line contours, that divide each figure essentially into six portions, are lines along which no current flows.

[0168] There are noticeable differences between the results in FIG. 4(a), for a single target radius, and those in FIG. 4(b), in which two target radii were used. In particular, FIG. 4(b) uses more windings in the portion of the coil outside the target region (at the top of the picture), in order to match the target fields more closely at the two target radii. There are also more subtle changes in the shape of the larger contours at the bottom of the picture.

[0169] A comparison between the T₂₁ fields computed for the single target radius and for two target radii is presented in FIG. 5, for the same values of the parameters as in FIGS. 4. The H_(z) field is shown as a function of position z along the coil, for the particular angle θ=−π, and at the two radii r=c₁ and r=c₂. The curves drawn with solid lines represent the results obtained for the situation in section 5.3 in which two target radii were used. These results agree with the exact target fields (5.4) to four decimal place accuracy, and the same level of agreement occurs for other angles not shown in FIG. 5. The dashed lines represent the results obtained when only the single target field is used, as in section 5.2, with a target radius c=0.15 metre. In that case, the agreement with the target field at the radius c₁ is of course very good, and no difference between the fields can be seen in FIG. 5 at that value of the radius. However, at the inner radius r=c₂, there is minor disagreement between the two computed fields, as may be seen from the diagram. The curve drawn with the solid line corresponds so closely to the exact target field (5.4) that it may be regarded as essentially exact, but the other curve drawn with the dashed line, representing results from the single target field only, has drifted away slightly from the required field, at this inner radius. This is not surprising, and the discrepancies in this case are not particularly great, but the diagram does serve to show the superior accuracy that is possible when two target radii are used, as described in section 5.3.

[0170] A further indication of the effectiveness of this invention is given in Table 1 at the end of this specification, where de-convolution has been used to determine the purity of the T₂₁ field established in the asymmetric region pL<z<qL. In this example, a shim coil appropriate to whole-body imaging was designed, with coil half-length L=0.75 metre and radius a=0.4 metre. The parameters that determine the location of the target field are p=−0.8 and q=0.1, so this is a very asymmetric coil indeed (the offset is −262.5 mm). For this coil, two target fields were used, at radii C₁=0.25 metre and c₂=0.005 metre. The de-convolution was performed at the outer target radius r=0.25 metre. The field components are arranged in decreasing percentage of the total, and it is clear that the T₂₁ field is accurately reproduced, to within 0.269%, even for such an asymmetrically placed target field.

EXAMPLE 3

[0171] The T₃₁ Shim Coil

[0172] A T₃₁ field in the asymmetrically positioned region pL<z<qL requires that the two target fields take the form $\begin{matrix} \begin{matrix} {{H_{T}\left( {{c_{1};\theta},z} \right)} = {{H_{\max}\left( \frac{{4Z_{2}^{2}} - \gamma_{1}^{2}}{{4\beta_{T}^{2}} - \gamma_{1}^{2}} \right)}\cos \quad \theta}} \\ {{H_{T}\left( {{c_{2};\theta},z} \right)} = {H_{\max}\frac{\gamma_{2}}{\gamma_{1}}\left( \frac{{4Z_{2}^{2}} - \gamma_{2}^{2}}{{4\beta_{T}^{2}} - \gamma_{1}^{2}} \right)\cos \quad {\theta.}}} \end{matrix} & (5.5) \end{matrix}$

[0173] As before, the function Z₂ and the various constants in these expressions (5.5) are defined in equations (5.1) and (5.2).

[0174]FIG. 6 shows the winding pattern required to produce a T₃₁ field, in a coil of length 2L=1 metre and radius a=0.2 metre, with two target radii 0.15 and 0.075 metre and asymmetry parameters p=−0.7 and q=0.1. Reverse windings are again present in the coil, and contours carrying zero current are indicated on the diagram. In this example, the desired target field is produced almost entirely by coil windings placed beyond the target region. Comparison with the exact target field (5.5) confirms that the required fields are reproduced to a high accuracy.

EXAMPLE 4

[0175] The T₄₂ Shim Coil

[0176] The final example is an asymmetrically located T₄₂ field. This requires that the target fields at the two radii c₁ and c₂ should take the forms $\begin{matrix} \begin{matrix} {{H_{T}\left( {{c_{1};\theta},z} \right)} = {{H_{\max}\left( \frac{{6Z_{2}^{2}} - \gamma_{1}^{2}}{{6\beta_{T}^{2}} - \gamma_{1}^{2}} \right)}\cos \quad 2\quad \theta}} \\ {{H_{T}\left( {{c_{2};\theta},z} \right)} = {{H_{\max}\left( \frac{\gamma_{2}}{\gamma_{1}} \right)}^{2}\left( \frac{{6Z_{2}^{2}} - \gamma_{2}^{2}}{{6\beta_{T}^{2}} - \gamma_{1}^{2}} \right)\cos \quad 2\quad {\theta.}}} \end{matrix} & (5.6) \end{matrix}$

[0177] The winding pattern for this coil, with the same values of the parameters as above, is shown in FIG. 7. Again, as the pattern is to be wrapped around the surface of a cylinder, there are four distinct sets of windings on the coil surface, with reverse windings indicated by the label “minus”. Again, many of the windings are concentrated in the region outside the target zone.

[0178] The method for designing tesseral shim coils has been illustrated with particular reference to four example tesseral coils, in which the section of interest (the DSV) has been arbitrarily located within the coil. However, the method of this invention can be applied to the design of coils that produce any tesseral field of interest, whether these fields consist purely of spherical harmonics or otherwise. Fields of exceptional purity can be designed using this technique, by making use of target fields imposed at two different radii internal to the coil.

[0179] 5.5 Shielded Asymmetric Tesseral Coils

[0180] The methods outlined above can be extended to design shim and gradient coils with active shielding.

[0181] As before, the primary coil is assumed to be a cylinder of radius a, located over the interval −L<z<L. It is now placed within another shielding cylinder of larger radius b>a, lying in the interval −r_(b)L<z<r_(b)L. The constant factor r_(b) is typically taken to be larger than 1, as the shielding coil is usually longer than the primary coil.

[0182] As in section 5.3, the desired magnetic field is matched at two radii c₁ and c₂ internal to the primary coil, so that 0<c₂<c₁<a. This occurs over the asymmetrically located target interval pL<z<qL, with −1<p<q<1, as previously. Now the purpose of the shielding coil of radius r=b is to eliminate as much as possible of the magnetic field external to the shielded coil device. This is achieved by introducing a third exterior target radius c₃>b and imposing a zero target field there. This additional target field requirement may therefore be represented by the expression

H _(T)(c ₃ ;θ,z)=0 on −sL <z<sL   (6.1)

[0183] The parameter s defines the interval over which the effect of the shield applies, external to the coil.

[0184] A streamfunction is defined on the primary coil r=a, and has the form given in equation (4.17). Similarly, a second streamfunction can be defined on the shield r=b. It, too, has the same form as in equation (4.17), except that L is replaced by r_(b)L, and an extra set of coefficients is required on the shield, to replace P_(nm) and Q_(nm) in this equation.

[0185] A least-squares expression similar to that in equation (4.20) is again minimized, to determine the coefficients P_(nm) and Q_(nm) on the primary coil r=a, and an additional equivalent set of coefficients on the shield coil r=b. The total error function now consists of error terms E similar to that in equation (4.11), evaluated at the three target radii c₁, C₂ and C₃. In addition, it is regularized using two Lagrange multipliers and two penalty functions similar to that shown in equations (4.18)-(4.19), involving the curvature of the streamfunction on the primary coil r=a and on the shield coil r=b.

[0186] Results of an example computation are presented in FIGS. 8. Here, a T₃₁ shim coil has been designed, as indicated in section 5.4 and equations (5.5). The primary coil has length 2L=1 metre and radius a=0.2 metre, and the two interior target radii are c₁=0.15 and c₂=0.075 metre, as before, with asymmetry parameters p=−0.7 and q=0.1. The shield coil has length 2r_(b)L=1.2 metre and radius b=0.25 metre, and the extinction condition (6.1) is imposed at target radius C₃=0.35 metre. In this example, the shielding condition is imposed over an interval of length 2sL=1.2 metre.

[0187]FIG. 8(a) shows the winding pattern on the primary coil, and the corresponding pattern for the shield coil is given in FIG. 8(b). As with the unshielded situation, the winding patterns consist of saddle-type arrangements, but involving rather novel shapes. Reverse windings are present in both the primary and the shield coils, and the desired T₃₁ field inside the primary coil is produced by windings placed largely outside the target zone. Comparison with the exact interior target field (5.5) again confirms that the desired field has been matched to a good degree of accuracy.

[0188] The axial component H_(z) of the magnetic field has been computed for this case, and contours of the field are presented in FIG. 9, on the plane y=0. The target field is faithfully reproduced over the interior target zone −0.35<z<0.05, 0<r<0.15 metre, although strong field irregularities are clearly visible at each end of the coil, and in particular at the end z=0.5 metre, farthest from the target zone. The active shield placed at radius b=0.25 metre, and having the winding pattern shown in FIG. 8(b), is very effective in eliminating the field beyond the exterior target radius C₃=0.35 metre, and this is evident from the Figure.

[0189] A shield coil having a length only somewhat longer than the primary coil with which it is used can lead to crowding of the windings on the primary coil which may be undesirable from a manufacturing point of view. Lengthening of the shielding coil (e.g., using an r_(b) value of 2.0) can reduce this crowding but at the expense of increasing the overall length of the magnetic resonance system which in the case of an MRI system, can add to the feeling of claustrophobia experienced by some patients. Thus, in general, tradeoffs between winding patterns and overall system functionality need to be addressed in the design of shim coils and, in particular, shim coils for MRI applications.

[0190] It will be understood by those skilled in the art that various changes to the details presented here may be made, without departing from the spirit and scope of this invention. TABLE 1 Field analysis for a T₂₁ coil with parameters L = 0.75 metre, a = 0.4 metre, p = −0.8, q = 0.1, and using the two target radii c₁ = 0.25 metre and c₂ = 0.005 metre. The analysis is performed at radius of 250 mm. Field Component Shim ‘Name’ Value Percentage B[2][1] ZY −3.126193e−06 100.000 B[1][1] Y −6.723331e−09  0.215 B[3][1] Z2Y −1.684259e−09  0.054 B[3][3] Y3  1.288168e−10 −4.121e−03 A[1][0] Z1  6.117545e−13 −1.957e−05 A[6][0] Z6 −2.674315e−13  8.555e−06 A[4][0] Z4 −2.575618e−13  8.239e−06 A[5][0] Z5  2.002127e−13 −6.404e−06 A[3][0] Z3 −1.979869e−13  6.333e−06 A[2][0] Z2  1.826997e−13 −5.844e−06 A[2][2] X2-Y2  5.536938e−14 −1.771e−06 A[0][0] Z0  5.393681e−14 −1.725e−06 A[3][2] Z(X2-Y2)  8.735131e−15 −2.794e−07 A[2][1] ZX −3.975819e−22  1.272e−14 A[1][1] X  3.290225e−23 −1.052e−15 B[2][2] XY  7.704895e−24 −2.465e−16 A[3][1] Z2X  4.348872e−24 −1.391e−16 B[3][2] Z(XY)  1.935077e−24 −6.190e−17 A[3][3] X3  1.779721e−24 −5.693e−17 

What is claimed is:
 1. A tesseral coil having (i) a longitudinal axis and a radius r describing a primary cylindrical surface and (ii) a predetermined volume in which at least one predetermined tesseral harmonic is generated (the tesseral harmonic volume) and comprising a plurality of current-carrying windings associated with the primary cylindrical surface, the tesseral coil producing a magnetic field, the longitudinal component of which is given by: ${B\left( {r,\theta,\varphi} \right)} = {\sum\limits_{n = 0}^{\infty}{\sum\limits_{m = 0}^{m = n}{{r^{n}\left\lbrack {{A_{nm}\cos \quad \left( {m\quad \varphi} \right)} + {B_{nm}{\sin \left( {m\quad \varphi} \right)}}} \right\rbrack}{P_{nm}\left( {\cos \quad \theta} \right)}}}}$

where A_(nm) and B_(nm) are the amplitudes of spherical harmonics, P_(nm)(cos θ) are associated Legendre polynomials, n is the order and m the degree of the polynomial, and r, θ and φ are polar co-ordinates; wherein: (i) the at least one predetermined tesseral harmonic has a degree m′ and an order n′ which satisfy the relationships: m′>0, and n′≧2; (ii) the primary cylindrical surface has first and second ends which define a length 2L therebetween; and (iii) the tesseral harmonic volume extends along the longitudinal axis from z=pL to z=qL, where (a) −1<p<q<1; (b) |p|≈|q|; and (c) z=0 is midway between the first and second ends of the primary cylindrical surface.
 2. The tesseral coil of claim 1 wherein: q−p≧0.01.
 3. The tesseral coil of claim 1 wherein: q−p≧0.05.
 4. The tesseral coil of claim 1 wherein: q−p≧0.5.
 5. The tesseral coil of claim 1 wherein: (a) the tesseral harmonic volume defines a midpoint M along the longitudinal axis, (b) the tesseral harmonic volume has a characteristic radius c given by: c=(q−p)L/2 when q−p<1, and by: c=(q−p)L/3 when q−p≧1; (c) the tesseral coil produces a single predetermined tesseral harmonic; and (d) the tesseral coil has a purity (P′) which is less than or equal to 0.2, where P′ equals the ratio of (1) the sum of the magnitudes of all harmonic coefficients other than the coefficient of the single predetermined tesseral harmonic which have a magnitude which is at least 0.001% of the magnitude of the coefficient of the single predetermined tesseral harmonic to (2) the magnitude of the coefficient of the single predetermined tesseral harmonic.
 6. The tesseral coil of claim 5 wherein P′ is less than or equal to 0.05.
 7. The tesseral coil of claim 5 wherein: (i) n′=2 or 3; (ii) q−p≧0.7; (iii) 2L≦1.4 meters; and (iv) P′≦0.1.
 8. The tesseral coil of claim 5 wherein: (i) n′=4, 5, 6, 7, or 8; (ii) q−p≧0.7; and (iii) 2L≦1.4 meters.
 9. The tesseral coil of claim 1 wherein: (a) the tesseral harmonic volume defines a midpoint M along the longitudinal axis, (b) the tesseral harmonic volume has a characteristic radius c given by: c=(q−p)L/2 when q−p<1, and by: c=(q−p)L/3 when q−p≧1; (c) the tesseral coil produces a plurality of predetermined tesseral harmonics; and (d) the tesseral coil has a purity (P′) which is less than or equal to 0.2, where P′ equals the ratio of (1) the sum of the magnitudes of all harmonic coefficients other than the coefficients of the plurality of predetermined tesseral harmonics which have a magnitude which is at least 0.001% of the magnitude of the largest coefficient of the plurality of predetermined tesseral harmonics to (2) the sum of the magnitudes of the coefficients of the plurality of predetermined tesseral harmonics.
 10. The tesseral coil of claim 9 wherein P′ is less than or equal to 0.05.
 11. The tesseral coil of claim 1 wherein |p| or |q| is greater than or equal to 0.7.
 12. The tesseral coil of claim 1 wherein the coil generates at least one additional predetermined tesseral harmonic in the tesseral harmonic volume, said at least one additional harmonic having a degree different from m′ and/or an order different from n′.
 13. The tesseral coil of claim 1 further comprising a shielding cylindrical surface co-axial and external to the primary cylindrical surface, said shielding cylindrical surface having a plurality of current-carrying windings associated therewith, said windings of the primary and shielding cylindrical surfaces causing the magnitude of the magnetic field generated by the tesseral coil to be below a predetermined value outside of a predetermined surface external to the shielding cylindrical surface.
 14. The tesseral coil of claim 13 wherein the shielding cylindrical surface has first and second ends which define a length 2L′ therebetween, where L′=r_(b)L and r_(b) is greater than or equal to 1.0.
 15. The tesseral coil of claim 1 wherein the coil is a shim coil for a magnetic resonance system.
 16. A shim set comprising a plurality of coils at least one of which is a tesseral coil defined by claim
 1. 17. The shim set of claim 16 wherein each of the coils in the shim set is a tesseral coil defined by claim
 1. 18. A shim set comprising a plurality of coils at least one of which is a tesseral coil defined by claim
 13. 19. The shim set of claim 18 wherein each of the coils in the shim set is a tesseral coil defined by claim
 13. 20. A magnetic resonance system comprising the shim set of claim
 16. 21. A magnetic resonance system comprising the shim set of claim
 18. 22. A method for designing a coil, where the coil has a longitudinal axis which lies along the z-axis of a three dimensional coordinate system, said method comprising the steps of: (a) selecting one or more cylindrical surfaces S₁ (i≧1) for calculating current densities for the coil, each surface (1) having a radius a_(i), (2) surrounding the longitudinal axis, and (3) extending from −L_(i) to +L_(i); (b) selecting a set of desired values for the longitudinal component of the magnetic field B_(z) (or H_(T)) to be produced by the coil at target locations on one or more cylindrical surfaces T_(J) (j≧1) which extend along the longitudinal axis from z=pL_(i) to z=qL_(i) where i=1 and −1<p<q<1; and (c) determining current density distributions j₁(θ,z) at the S₁ surfaces for the coil by: (1) expressing B_(z) (or H_(T)) in terms of j_(i)(θ,z); (2) expressing the z-component of each of the j_(i)(θ,z) (j_(zi)(θ,z)) in terms of a basis function expansion and constraining j_(z1)(θ,z) to equal 0 at −L, and +L₁, said expansion including a set of coefficients; (3) expressing B_(z) (or H_(T)) in terms of said basis function expansions; and (4) for each of j_(z1)(θ,z), determining values for said set of coefficients of said basis function expansion by: i. selecting an error function which comprises a measure of the difference between the desired B_(z) (or H_(T)) values at the target locations and the B_(z) values calculated at those locations using the basis function expansions of the j_(zi)(θ,z); ii. regularizing said error function; and iii. determining values for the sets of coefficients using the regularized error function; and (5) determining the azimuthal-component of j₁(θ,z) (j_(θ1)(θ,z)) using the values for the sets of coefficients determined in step (c)(4) and the continuity equation.
 23. The method of claim 22 wherein in step (c)(4)ii, the regularization employs one or more regularization parameters, one parameter for each j₁(θ,z), said parameter being the curvature of a streamfunction for j₁(θ,z).
 24. The method of claim 22 wherein in step (c)(4)ii, the regularization employs a regularization parameter which is the power dissipated in the coil.
 25. The method of claim 22 wherein in step (c)(4)ii, the regularization employs a regularization parameter which is the energy stored in the coil.
 26. The method of claim 22 wherein |p|=|q|.
 27. The method of claim 22 wherein |p|≈|q|.
 28. The method of claim 22 wherein i equals 2, a primary coil is located at S₁ and a shielding coil is located at S₂.
 29. The method of claim 28 wherein j equals 3, T₁ and T₂ are internal to S₁, T₃ is external to S₂, and the desired values for the longitudinal component of the magnetic field B_(z) (or H_(T)) on T₃ are zero.
 30. The method of claim 22 further comprising generating discrete current carrying windings for each of the j_(i)(θ,z) by: (1) determining a streamfunction ψ for the j_(i)(θ,z); (2) selecting a number of current carrying windings N; (3) determining a current per winding value I=J/N, where J is the total obtained by integrating j₁(θ,z) over S_(i); (4) contouring the streamfunction ψ and thereby determining a set of j₁(θ,z) blocks over the S₁ surface within the longitudinal range from −L₁ to +L₁ such that the integral of j₁(θ,z) over each block equals I; and (5) for all blocks having a net polarity for j₁(θ,z) over the block, placing a winding at the center of the block, the direction of the current in the winding corresponding to said net polarity.
 31. The method of claim 30 comprising the additional step of producing a coil having said discrete current carrying windings.
 32. The method of claim 22 comprising the additional step of displaying at least one of the j₁(θ,z) or a component thereof.
 33. An article of manufacture comprising a computer usable medium having computer readable code means embodied therein for designing a coil in accordance with the method of claim
 22. 34. Apparatus for designing a coil comprising a programmed computer for performing the method of claim
 22. 35. A method for designing a coil comprising: (a) selecting one or more surfaces S_(i) (i≧1) for calculating current densities for the coil; (b) selecting a set of desired values for one or more components of the magnetic field B (or H) to be produced by the coil at target locations on one or more surfaces T_(J)(j≧1); and (c) determining current density distributions j_(i) at the S_(i) surfaces for the coil by: (1) expressing B (or H) in terms of j₁; (2) expressing each of the j₁ in terms of a basis function expansion having a set of coefficients; (3) expressing B (or H) in terms of said basis function expansions; and (4) for each j₁ determining values for said set of coefficients of said basis function expansion by: i. selecting an error function which comprises a measure of the difference between the desired B (or H) values at the target locations and B (or H) values calculated at those locations using the basis function expansions of the j₁; ii. regularizing said error function using one or more regularization parameters, one parameter for each j₁, said parameter being the curvature of a streamfunction for j₁; and iii. determining values for the sets of coefficients using the regularized error function.
 36. The method of claim 35 wherein i equals 1 and j equals
 1. 37. The method of claim 35 wherein i equals 2, a primary coil is located at S₁ and a shielding coil is located at S₂.
 38. The method of claim 37 wherein j equals 3, T₁ and T₂ are internal to S₁, T₃ is external to S₂, and the desired values for the magnetic field B (or H) on T₃ are zero.
 39. The method of claim 35 further comprising generating discrete current carrying windings for each of the j_(i) by: (1) selecting a number of current carrying windings N; (2) determining a current per winding value I=J/N, where J is the total obtained by integrating j₁ over S_(i); (4) contouring the streamfunction used in step (4)ii and thereby determining a set of j₁ blocks over the S_(i) surface such that the integral of j₁ over each block equals I; and (5) for all blocks having a net polarity for j₁ over the block, placing a winding at the center of the block, the direction of the current in the winding corresponding to said net polarity.
 40. The method of claim 39 comprising the additional step of producing a coil having said discrete current carrying windings.
 41. The method of claim 35 comprising the additional step of displaying at least one of the j_(i) or a component thereof.
 42. An article of manufacture comprising a computer usable medium having computer readable code means embodied therein for designing a coil in accordance with the method of claim
 35. 43. Apparatus for designing a coil comprising a programmed computer for performing the method of claim
 35. 